<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>SSM-backbone</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="css/font-awesome.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="css/AdminLTE.min.css">
  <!-- 蓝色样式 -->
  <link rel="stylesheet" href="css/skin-blue.css">
  <!-- DataTables -->
  <link rel="stylesheet" href="css/dataTables.bootstrap.css">
  <!-- 自定义样式 -->
  <link rel="stylesheet" href="css/style.css">
  <!-- jQuery 3 -->
  <script src="js/jquery.min.js"></script>
  <!-- Bootstrap 3.3.7 -->
  <script src="js/bootstrap.min.js"></script>
  <!-- AdminLTE App -->
  <script src="js/adminlte.min.js"></script>
  <!-- DataTables -->
  <script src="js/jquery.dataTables.min.js"></script>
  <script src="js/dataTables.bootstrap.min.js"></script>
  <!-- myblog -->
  <script src="js/myblog.js"></script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">
		<!-- 页头 -->
		<header class="main-header" th:fragment="top">
		  <!-- Logo -->
		  <a href="#" class="logo">      
		    <!-- logo for regular state and mobile devices -->
		    <span class="logo-lg">教务管理系统</span>
		  </a>
		  <!-- Header Navbar: style can be found in header.less -->
		  <nav class="navbar navbar-static-top">
		    <!-- Sidebar toggle button-->
		    <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
		      <span class="sr-only">折叠导航栏</span>
		    </a>
		    <div class="navbar-custom-menu">
		      <ul class="nav navbar-nav">
		        <!-- User Account: style can be found in dropdown.less -->
		        <li class="dropdown user user-menu">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
		            <img th:src="${loginUser != null && loginUser.logo != null && !loginUser.logo.isEmpty() ? loginUser.logo : 'imgs/user2-160x160.jpg'}" class="user-image" alt="User Image">
		            <span class="hidden-xs" th:text="${loginUser != null ? loginUser.alias : '用户'}">用户</span>
		          </a>
		          <ul class="dropdown-menu">
		            <!-- User image -->
		            <li class="user-header">
		              <img th:src="${loginUser != null && loginUser.logo != null && !loginUser.logo.isEmpty() ? loginUser.logo : 'imgs/user2-160x160.jpg'}" class="img-circle" alt="User Image">
		              <p th:text="${loginUser != null ? loginUser.alias : '用户'}">用户</p>
		            </li>
		            <!-- Menu Footer-->
		            <li class="user-footer">
		              <div class="pull-left">
		                <a href="#" onclick="loadProfile()" class="btn btn-default btn-flat">个人中心</a>
		              </div>
		              <div class="pull-right">
		                <a href="/logout" class="btn btn-default btn-flat">退出</a>
		              </div>
		            </li>
		          </ul>
		        </li>          
		      </ul>
		    </div>
		  </nav>
		</header>
		<!-- 侧边栏 -->
		<aside class="main-sidebar" th:fragment="sidebar">
			 <!-- sidebar: style can be found in sidebar.less -->
			<section class="sidebar">
			  <!-- sidebar menu: : style can be found in sidebar.less -->
			  <ul class="sidebar-menu" data-widget="tree" th:utext="${menu}">
			  </ul>
			</section>
			<script>
				$(".treeview-menu").on('click','a',function(event){
			  		event.preventDefault();
			  		file=$(this).attr('action');
					if(file!='#'){
						$("#content").load('/' + file);
						$(".page_name").html($(this).attr('dataName'));
					}
			  	});
				
				// 加载个人中心页面
				function loadProfile() {
					$("#content").load('/user/profile');
					$(".page_name").html("个人中心");
				}
	  		</script>
			<!-- /.sidebar -->
		</aside>
		<!-- 内容区，程序主要修改此处 -->
		<div class="content-wrapper">
		  <!-- Content Header (Page header) -->
		  <section class="content-header">
		    <h1 class="page_name">
		      控制面板        
		    </h1>
		    <ol class="breadcrumb">
		      <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
		      <li class="active page_name">控制面板</li>
		    </ol>
		  </section>
		
		  <!-- Main content -->
		  <section class="content" id="content">
		  
		  </section>
		  <!-- /.content -->
		</div>
		<!-- 页脚 -->
		<footer class="main-footer" th:fragment="footer">    
    		<strong>Copyright &copy; 2014-2016 <a href="#">Almsaeed Studio</a>.</strong> 版权所有.
  		</footer>
	</div>
</body>
</html>